python for loop giving error 'list' object is not callable